package com.hjy.demo.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hjy.demo.pojo.User;
import org.springframework.cache.annotation.Cacheable;

public interface UserService {
    @Cacheable(value ="user::findUserByName" ,key = "#p0")
    User findUserByName(String name);

    User login(String name,String pwd);

    IPage<User> selectPage(Page<User>  page, Wrapper<User> wrapper);

    int addUser(User user);
    int deleteUser(Long usrId);
    int updateUser(User user);
    public User getUser(Long usrId);
}
